/*
Realistic Unit Modification v4.0 Dialog 
v4.0.0.1 [ALPHA]
Concept & Development by Draper & Raps | [VRC]
*/

/*
null = [this, "A3B_Full"] call compile preprocessFile "RUM\Supply\A3_SupplyLoads.sqf";
*/

private ["_crate","_strLoadout","_launchers","_launcherAmmo","_rifles","_rifleAmmo","_sRifles","_sRifleAmmo","_Ammo","_attachments","_items","_kits","_ordnance","_magAmount"];

/* define variables */
_crate = _this select 0;
_strLoadout = _this select 1;
 
/* amount settings */
_launchers = 3;
_launcherAmmo = 4;
_rifles = 2;
_rifleAmmo = 30;
_sRifles = 3;
_sRifleAmmo = 15;
_Ammo = 25;
_attachments = 3;
_items = 3;
_kits = 2;
_ordnance = 10;
_magAmount = 10;

_crate allowDamage false;

/* Clear item that is being used to store */
clearBackpackCargo _crate;
clearItemCargo _crate;
clearWeaponCargo _crate;
clearMagazineCargo _crate;
 
switch (_strLoadout) do {
	/* Blufor Weapons, Ammo, Items, Backpacks, and other */
	case "A3B_Launchers": {
		_crate addweaponcargo ["launch_NLAW_F", _launchers];
		_crate addweaponcargo ["launch_B_Titan_F", _launchers];
		_crate addweaponcargo ["launch_B_Titan_short_F", _launchers];
		_crate addmagazinecargo ["Titan_AT", _launcherAmmo];
		_crate addmagazinecargo ["Titan_AP", _launcherAmmo];
		_crate addmagazinecargo ["Titan_AA", _launcherAmmo];
		_crate addmagazinecargo ["NLAW_F", _launcherAmmo];
	};
	case "A3B_Sniper": {
		_crate addweaponcargo ["arifle_MXM_Hamr_pointer_F", _sRifles];
		_crate addweaponcargo ["srifle_GM6_SOS_F", _sRifles];
		_crate addweaponcargo ["srifle_LRR_SOS_F", _sRifles];
		_crate addmagazinecargo ["7Rnd_408_Mag", _sRifleAmmo];
		_crate addmagazinecargo ["5Rnd_127x108_Mag", _sRifleAmmo];
		_crate addmagazinecargo ["30Rnd_65x39_caseless_mag", _sRifleAmmo];
		_crate addmagazinecargo ["30Rnd_65x39_caseless_mag_Tracer", _sRifleAmmo];
		_crate addweaponcargo ["Laserdesignator", _items];
		_crate addmagazinecargo ["Laserbatteries", _items];
	};
	case "A3B_Rifles": {
		_crate addweaponcargo ["srifle_EBR_SOS_F", _rifles];
		_crate addweaponcargo ["srifle_EBR_MRCO_pointer_F", _rifles];
		_crate addweaponcargo ["srifle_EBR_ARCO_pointer_F", _rifles];
		_crate addweaponcargo ["LMG_Mk200_MRCO_F", _rifles];
		_crate addweaponcargo ["arifle_MXM_Hamr_pointer_F", _rifles];
		_crate addweaponcargo ["arifle_MXC_Holo_pointer_snds_F", _rifles];
		_crate addweaponcargo ["arifle_MXC_Holo_pointer_F", _rifles];
		_crate addweaponcargo ["arifle_MXC_ACO_pointer_F", _rifles];
		_crate addweaponcargo ["arifle_MX_SW_Hamr_pointer_F", _rifles];
		_crate addweaponcargo ["arifle_MX_Holo_pointer_F", _rifles];
		_crate addweaponcargo ["arifle_MX_Hamr_pointer_F", _rifles];
		_crate addweaponcargo ["arifle_MX_GL_Hamr_pointer_F", _rifles];
		_crate addweaponcargo ["arifle_MX_GL_ACO_pointer_F", _rifles];
		_crate addweaponcargo ["arifle_MX_ACO_pointer_F", _rifles];
		_crate addmagazinecargo ["30Rnd_556x45_Stanag", _rifleAmmo];
		_crate addmagazinecargo ["30Rnd_556x45_Stanag_Tracer_Green", _rifleAmmo];
		_crate addmagazinecargo ["30Rnd_556x45_Stanag_Tracer_Red", _rifleAmmo];
		_crate addmagazinecargo ["30Rnd_556x45_Stanag_Tracer_Yellow", _rifleAmmo];
		_crate addmagazinecargo ["20Rnd_762x51_Mag", _rifleAmmo];
		_crate addmagazinecargo ["1Rnd_HE_Grenade_shell", _rifleAmmo];
		_crate addmagazinecargo ["1Rnd_Smoke_Grenade_shell", _rifleAmmo];
		_crate addmagazinecargo ["1Rnd_SmokeBlue_Grenade_shell", _rifleAmmo];
		_crate addmagazinecargo ["1Rnd_SmokeGreen_Grenade_shell", _rifleAmmo];
		_crate addmagazinecargo ["1Rnd_SmokeOrange_Grenade_shell", _rifleAmmo];
		_crate addmagazinecargo ["1Rnd_SmokePurple_Grenade_shell", _rifleAmmo];
		_crate addmagazinecargo ["1Rnd_SmokeRed_Grenade_shell", _rifleAmmo];
		_crate addmagazinecargo ["1Rnd_SmokeYellow_Grenade_shell", _rifleAmmo];
		_crate addmagazinecargo ["UGL_FlareCIR_F", _rifleAmmo];
		_crate addmagazinecargo ["UGL_FlareGreen_F", _rifleAmmo];
		_crate addmagazinecargo ["UGL_FlareRed_F", _rifleAmmo];
		_crate addmagazinecargo ["UGL_FlareWhite_F", _rifleAmmo];
		_crate addmagazinecargo ["UGL_FlareYellow_F", _rifleAmmo];
		_crate addmagazinecargo ["3Rnd_HE_Grenade_shell", _rifleAmmo];
	};	
	case "A3B_Items": {
		_crate additemcargo ["optic_MRCO", _attachments];
		_crate additemcargo ["optic_Holosight", _attachments];
		_crate additemcargo ["optic_Hamr", _attachments];
		_crate additemcargo ["optic_Arco", _attachments];
		_crate additemcargo ["optic_ACO_grn", _attachments];
		_crate additemcargo ["optic_Aco", _attachments];
		_crate additemcargo ["acc_pointer_IR", _attachments];
		_crate additemcargo ["acc_flashlight", _attachments];
		_crate additemcargo ["muzzle_snds_M", _attachments];
		_crate additemcargo ["muzzle_snds_L", _attachments];
		_crate additemcargo ["muzzle_snds_H_MG", _attachments];
		_crate additemcargo ["muzzle_snds_H", _attachments];
		_crate additemcargo ["muzzle_snds_B", _attachments];
		_crate addweaponcargo ["Binocular", _items];
		_crate addweaponcargo ["Rangefinder", _items];
		_crate additemcargo ["ItemCompass", _items];
		_crate additemcargo ["ItemGPS", _items];
		_crate additemcargo ["ItemMap", _items];
		_crate additemcargo ["ItemRadio", _items];
		_crate additemcargo ["ItemWatch", _items];
		_crate addweaponcargo ["Laserdesignator", 2];
		_crate addmagazinecargo ["Laserbatteries", 2];
		_crate additemcargo ["NVGoggles", 5];
		_crate addweaponcargo ["MineDetector", 3];
		_crate addmagazinecargo ["Chemlight_green", 30];
		_crate addmagazinecargo ["Chemlight_red", 30];
		_crate addmagazinecargo ["Chemlight_yellow", 30];
		_crate addmagazinecargo ["Chemlight_blue", 30];
		_crate additemcargo ["FirstAidKit", 40];
		_crate additemcargo ["ToolKit", _kits];
		_crate additemcargo ["Medikit", _kits];
	};
	case "A3B_Ordnance": {
		_crate addmagazinecargo ["DemoCharge_Remote_Mag", _ordnance];
		_crate addmagazinecargo ["ATMine_Range_Mag", _magAmount];
		_crate addmagazinecargo ["SatchelCharge_Remote_Mag", _magAmount];
		_crate addmagazinecargo ["ClaymoreDirectionalMine_Remote_Mag", _magAmount];
		_crate addmagazinecargo ["APERSMine_Range_Mag", _magAmount];
		_crate addmagazinecargo ["APERSBoundingMine_Range_Mag", _magAmount];
		_crate addmagazinecargo ["APERSTripMine_Wire_Mag", _magAmount];
		_crate addmagazinecargo ["HandGrenade_Stone", _magAmount];
		_crate addmagazinecargo ["HandGrenade", _magAmount];
		_crate addmagazinecargo ["MiniGrenade", _magAmount];
		_crate addmagazinecargo ["SmokeShell", _magAmount];
		_crate addmagazinecargo ["SmokeShellYellow", _magAmount];
		_crate addmagazinecargo ["SmokeShellGreen", _magAmount];
		_crate addmagazinecargo ["SmokeShellRed", _magAmount];
		_crate addmagazinecargo ["SmokeShellPurple", _magAmount];
		_crate addmagazinecargo ["SmokeShellOrange", _magAmount];
		_crate addmagazinecargo ["SmokeShellBlue", _magAmount];
		_crate addmagazinecargo ["1Rnd_HE_Grenade_shell", _magAmount];
		_crate addmagazinecargo ["1Rnd_Smoke_Grenade_shell", _magAmount];
		_crate addmagazinecargo ["1Rnd_SmokeBlue_Grenade_shell", _magAmount];
		_crate addmagazinecargo ["1Rnd_SmokeGreen_Grenade_shell", _magAmount];
		_crate addmagazinecargo ["1Rnd_SmokeOrange_Grenade_shell", _magAmount];
		_crate addmagazinecargo ["1Rnd_SmokePurple_Grenade_shell", _magAmount];
		_crate addmagazinecargo ["1Rnd_SmokeRed_Grenade_shell", _magAmount];
		_crate addmagazinecargo ["1Rnd_SmokeYellow_Grenade_shell", _magAmount];
	};
	case "A3B_MissionOrdnance": {
		_crate addweaponcargo ["launch_NLAW_F", _launchers];
		_crate addweaponcargo ["launch_B_Titan_F", _launchers];
		_crate addweaponcargo ["launch_B_Titan_short_F", _launchers];
		_crate addmagazinecargo ["Titan_AT", _launcherAmmo];
		_crate addmagazinecargo ["Titan_AP", _launcherAmmo];
		_crate addmagazinecargo ["Titan_AA", _launcherAmmo];
		_crate addmagazinecargo ["NLAW_F", _launcherAmmo];

		_crate addweaponcargo ["arifle_MXM_Hamr_pointer_F", _sRifles];
		_crate addweaponcargo ["srifle_GM6_SOS_F", _sRifles];
		_crate addweaponcargo ["srifle_LRR_SOS_F", _sRifles];
		_crate addmagazinecargo ["7Rnd_408_Mag", _sRifleAmmo];
		_crate addmagazinecargo ["5Rnd_127x108_Mag", _sRifleAmmo];
		_crate addmagazinecargo ["30Rnd_65x39_caseless_mag", _sRifleAmmo];
		_crate addmagazinecargo ["30Rnd_65x39_caseless_mag_Tracer", _sRifleAmmo];
		_crate addweaponcargo ["Laserdesignator", _items];
		_crate addmagazinecargo ["Laserbatteries", _items];

		_crate addweaponcargo ["srifle_EBR_SOS_F", _rifles];
		_crate addweaponcargo ["srifle_EBR_MRCO_pointer_F", _rifles];
		_crate addweaponcargo ["srifle_EBR_ARCO_pointer_F", _rifles];
		_crate addweaponcargo ["LMG_Mk200_MRCO_F", _rifles];
		_crate addweaponcargo ["arifle_MXM_Hamr_pointer_F", _rifles];
		_crate addweaponcargo ["arifle_MXC_Holo_pointer_snds_F", _rifles];
		_crate addweaponcargo ["arifle_MXC_Holo_pointer_F", _rifles];
		_crate addweaponcargo ["arifle_MXC_ACO_pointer_F", _rifles];
		_crate addweaponcargo ["arifle_MX_SW_Hamr_pointer_F", _rifles];
		_crate addweaponcargo ["arifle_MX_Holo_pointer_F", _rifles];
		_crate addweaponcargo ["arifle_MX_Hamr_pointer_F", _rifles];
		_crate addweaponcargo ["arifle_MX_GL_Hamr_pointer_F", _rifles];
		_crate addweaponcargo ["arifle_MX_GL_ACO_pointer_F", _rifles];
		_crate addweaponcargo ["arifle_MX_ACO_pointer_F", _rifles];
		_crate addmagazinecargo ["30Rnd_556x45_Stanag", _rifleAmmo];
		_crate addmagazinecargo ["30Rnd_556x45_Stanag_Tracer_Green", _rifleAmmo];
		_crate addmagazinecargo ["30Rnd_556x45_Stanag_Tracer_Red", _rifleAmmo];
		_crate addmagazinecargo ["30Rnd_556x45_Stanag_Tracer_Yellow", _rifleAmmo];
		_crate addmagazinecargo ["20Rnd_762x51_Mag", _rifleAmmo];
		_crate addmagazinecargo ["1Rnd_HE_Grenade_shell", _rifleAmmo];
		_crate addmagazinecargo ["1Rnd_Smoke_Grenade_shell", _rifleAmmo];
		_crate addmagazinecargo ["1Rnd_SmokeBlue_Grenade_shell", _rifleAmmo];
		_crate addmagazinecargo ["1Rnd_SmokeGreen_Grenade_shell", _rifleAmmo];
		_crate addmagazinecargo ["1Rnd_SmokeOrange_Grenade_shell", _rifleAmmo];
		_crate addmagazinecargo ["1Rnd_SmokePurple_Grenade_shell", _rifleAmmo];
		_crate addmagazinecargo ["1Rnd_SmokeRed_Grenade_shell", _rifleAmmo];
		_crate addmagazinecargo ["1Rnd_SmokeYellow_Grenade_shell", _rifleAmmo];
		_crate addmagazinecargo ["UGL_FlareCIR_F", _rifleAmmo];
		_crate addmagazinecargo ["UGL_FlareGreen_F", _rifleAmmo];
		_crate addmagazinecargo ["UGL_FlareRed_F", _rifleAmmo];
		_crate addmagazinecargo ["UGL_FlareWhite_F", _rifleAmmo];
		_crate addmagazinecargo ["UGL_FlareYellow_F", _rifleAmmo];
		_crate addmagazinecargo ["3Rnd_HE_Grenade_shell", _rifleAmmo];

		_crate additemcargo ["optic_MRCO", _attachments];
		_crate additemcargo ["optic_Holosight", _attachments];
		_crate additemcargo ["optic_Hamr", _attachments];
		_crate additemcargo ["optic_Arco", _attachments];
		_crate additemcargo ["optic_ACO_grn", _attachments];
		_crate additemcargo ["optic_Aco", _attachments];
		_crate additemcargo ["acc_pointer_IR", _attachments];
		_crate additemcargo ["acc_flashlight", _attachments];
		_crate additemcargo ["muzzle_snds_M", _attachments];
		_crate additemcargo ["muzzle_snds_L", _attachments];
		_crate additemcargo ["muzzle_snds_H_MG", _attachments];
		_crate additemcargo ["muzzle_snds_H", _attachments];
		_crate additemcargo ["muzzle_snds_B", _attachments];
		_crate addweaponcargo ["Binocular", _items];
		_crate addweaponcargo ["Rangefinder", _items];
		_crate additemcargo ["ItemCompass", _items];
		_crate additemcargo ["ItemGPS", _items];
		_crate additemcargo ["ItemMap", _items];
		_crate additemcargo ["ItemRadio", _items];
		_crate additemcargo ["ItemWatch", _items];
		_crate addweaponcargo ["Laserdesignator", 2];
		_crate addmagazinecargo ["Laserbatteries", 2];
		_crate additemcargo ["NVGoggles", 5];
		_crate addweaponcargo ["MineDetector", 3];
		_crate addmagazinecargo ["Chemlight_green", 30];
		_crate addmagazinecargo ["Chemlight_red", 30];
		_crate addmagazinecargo ["Chemlight_yellow", 30];
		_crate addmagazinecargo ["Chemlight_blue", 30];
		_crate additemcargo ["FirstAidKit", 40];
		_crate additemcargo ["ToolKit", _kits];
		_crate additemcargo ["Medikit", _kits];

		_crate addmagazinecargo ["DemoCharge_Remote_Mag", _ordnance];
		_crate addmagazinecargo ["ATMine_Range_Mag", _magAmount];
		_crate addmagazinecargo ["SatchelCharge_Remote_Mag", _magAmount];
		_crate addmagazinecargo ["ClaymoreDirectionalMine_Remote_Mag", _magAmount];
		_crate addmagazinecargo ["APERSMine_Range_Mag", _magAmount];
		_crate addmagazinecargo ["APERSBoundingMine_Range_Mag", _magAmount];
		_crate addmagazinecargo ["APERSTripMine_Wire_Mag", _magAmount];
		_crate addmagazinecargo ["HandGrenade_Stone", _magAmount];
		_crate addmagazinecargo ["HandGrenade", _magAmount];
		_crate addmagazinecargo ["MiniGrenade", _magAmount];
		_crate addmagazinecargo ["SmokeShell", _magAmount];
		_crate addmagazinecargo ["SmokeShellYellow", _magAmount];
		_crate addmagazinecargo ["SmokeShellGreen", _magAmount];
		_crate addmagazinecargo ["SmokeShellRed", _magAmount];
		_crate addmagazinecargo ["SmokeShellPurple", _magAmount];
		_crate addmagazinecargo ["SmokeShellOrange", _magAmount];
		_crate addmagazinecargo ["SmokeShellBlue", _magAmount];
		_crate addmagazinecargo ["1Rnd_HE_Grenade_shell", _magAmount];
		_crate addmagazinecargo ["1Rnd_Smoke_Grenade_shell", _magAmount];
		_crate addmagazinecargo ["1Rnd_SmokeBlue_Grenade_shell", _magAmount];
		_crate addmagazinecargo ["1Rnd_SmokeGreen_Grenade_shell", _magAmount];
		_crate addmagazinecargo ["1Rnd_SmokeOrange_Grenade_shell", _magAmount];
		_crate addmagazinecargo ["1Rnd_SmokePurple_Grenade_shell", _magAmount];
		_crate addmagazinecargo ["1Rnd_SmokeRed_Grenade_shell", _magAmount];
		_crate addmagazinecargo ["1Rnd_SmokeYellow_Grenade_shell", _magAmount];
	};
};

if (true) exitWith {}; 